<template>
	<view>
		<u-navbar placeholder :autoBack="true" title="停车缴费"></u-navbar>
		<scroll-view :scroll-y="true" :style="{height: scrollViewHeight, backgroundColor: '#f5f5f5'}">
			<view :style="{backgroundColor: appColor}" class="parking-top">
				<text style="color: #fff;font-size: 36rpx;letter-spacing: 2rpx;">璧山花儿朵朵停车场</text>
			</view>
			<view style="padding: 32rpx;background-color: #fff;">
				<view class="title">
					<text>景区停车场</text>
					<view class="title-color" :style="{backgroundColor: appColor}"></view>
				</view>
				<view style="padding: 16rpx;">
					<car-number-input :appColor="appColor" @numberInputResult="numberInputResult" :defaultStr="defaultNum"></car-number-input>
					<!-- <view class="">
						<u-code-input :maxlength="2" :space="0" hairline v-model="plateNumber"></u-code-input>
					</view>
					<view style="font-size: 36rpx;padding: 0 16rpx;">·</view>
					<view class="">
						<u-code-input :maxlength="6" :space="0" hairline v-model="plateNumber1"></u-code-input>
					</view> -->
				</view>
			</view>
			<view style="padding: 32rpx;background-color: #fff;">
				<view class="title">
					<text>缴费提示</text>
					<view class="title-color"></view>
				</view>
				
				<view style="font-size: 28rpx;color: #333;padding-left: 16rpx;">请在支付成功后15分钟内尽快立场, 15分钟之后重新开始计费</view>
			</view>
		</scroll-view>
		<view class="good-detail-bootom">
			<view style="margin: 0 16rpx;height: 100%;width: calc(100vw - 32rpx);display: flex;align-items: center;">
				<view class="good-detail-bootom-r">
					<u-button :throttleTime="300" @click="save" :color="appColor" text="立即缴费" shape="circle"></u-button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {mapActions} from 'vuex';
	import {notice} from '@/api/home.js';
	export default {
		data() {
			return {
				defaultNum: '渝A'
			}
		},
		computed: {
			appColor() {
				return this.appPrimaryColor || '#f40215'
			},
			scrollViewHeight() {
				return this.scrollHeight - 44 + 'px';
			}
		},
		onLoad() {
		},
		methods: {
			numberInputResult(e) {
				console.log('结果--' + e)
			},
			save() {
				this.$cuNavigateTo('/pageDiamond1/parking/result');
			}
		}
	}
</script>


<style lang="scss" scoped>
	.parking-top {
		height: 380rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.title {
		font-size: 32rpx;
		color: #333;
		font-weight: bold;
		position: relative;
		padding-left: 16rpx;
		line-height: 32rpx;
		margin-bottom: 16rpx;
		.title-color {
			width: 4rpx;
			height: 100%;
			position: absolute;
			left: 0;
			top: 0;
		}
	}
	
	.good-detail-bootom {
		background-color: #ffffff;
		position: fixed;
		height: 50px;
		width: 100vw;
		bottom: 0;
		left: 0;
		padding-bottom: constant(safe-area-inset-bottom);
		/*兼容 iOS<11.2*/
		padding-bottom: env(safe-area-inset-bottom);
		/*兼容 iOS>11.2*/
		box-sizing: content-box;
	
		.good-detail-bootom-r {
			flex: 1;
			text-align: right
		}
	}
</style>
